package com.allwinter.yibangsafe.mapper;

import com.allwinter.yibangsafe.domain.Comment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface CommentMapper extends BaseMapper<Comment> {

    @Select("select comment.userid,commentid,likenum,avatarurl,nickname,content,parentid,createtime from comment,wx_user where comment.serviceid=#{serviceid}")
    List<Map<String,Object>> getCommentByServiceId (@Param("serviceid") Long serviceid);
}
